<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>活动内容列表</title>
	<link href="/botutp/Public/admin/css/style.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="/botutp/Public/admin/js/jquery.js"></script>
	<script type="text/javascript" src="/botutp/Public/My97DatePicker/WdatePicker.js"></script> 
	<script type="text/javascript" src="/botutp/Public/layer/layer.js"></script>

	<link href="/botutp/Public/admin/css/select.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="/botutp/Public/admin/js/jquery.idTabs.min.js"></script>
	<script type="text/javascript" src="/botutp/Public/admin/js/select-ui.min.js"></script>

	<script type="text/javascript">
	$(document).ready(function(e) {
    	$("#classtype").uedSelect({
			width : 150			  
		});
	});
	</script>
  	<script type="text/javascript">
            function show(id) {
                layer.open({
                    type: 2,
                    title: '详细信息',
                    maxmin: false,
                    shadeClose: true, //点击遮罩关闭层
                    area: ['800px', '520px'],
                    content: '<?php echo U("Eventinfo/eventinfodetail");?>&id=' + id
                });
            }
    </script>
</head>

<body>

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="<?php echo U('index/welcome');?>">首页</a></li>
			<li><a href="<?php echo U('Eventinfo/index');?>">活动列表</a></li>
		</ul>
    </div>
    
    <div class="formbody">
		<ul class="toolbar">
			<li onclick="location.href = '<?php echo U('Eventinfo/addeventinfo');?>'"><span><img src="/botutp/Public/admin/images/t01.png" /></span>添加活动</li> 
		</ul> 
		<form name="seachform" id="seachform" action="<?php echo U('Eventinfo/index');?>" method="post">
			<ul class="seachform">
				<li><label>标题查询</label><input name="info[keyword]" id="keyword" value="<?php echo ($keyword); ?>" type="text" class="scinput" /></li>
				<li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>
			</ul>
		</form>
		
		<table class="tablelist">
			<thead>
				<tr>
					<th><input name="" type="checkbox" value="" /></th>
					<th>编号</th>
					<th>活动标题</th>
					<th>开始时间</th>
					<th>结束时间</th>
					<th>商家</th>
					<th>参与用户数</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<?php if(is_array($listinfo)): $i = 0; $__LIST__ = $listinfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$content): $mod = ($i % 2 );++$i;?><tr>
					<td><input name="" type="checkbox" value="" /></td>
					<td><?php echo ($content["id"]); ?></td>
					<td><?php echo ($content["event_title"]); ?></td>
					<td><?php echo (date("Y-m-d H:i:s",$content["event_starttime"])); ?></td>
					<td><?php echo (date("Y-m-d H:i:s",$content["event_endtime"])); ?></td>
					<td><?php echo ($content["username"]); ?>（<?php echo ($content["realname"]); ?>）</td>
					<td><?php echo ($content["event_num"]); ?></td>
					<td>
						<a href="<?php echo U('Eventinfo/editeventinfo',array('id'=>$content['id']));?>" class="tablelink">编辑</a>&nbsp;&nbsp;
						<a href="<?php echo U('Eventinfo/deleventinfo',array('id'=>$content['id']));?>" onclick="{if(confirm('确认删除?')){return true;}return false;}" class="tablelink">删除</a>&nbsp;&nbsp;
						<a href="javascript:show(<?= $content['id'];?>);" class="tablelink">查看</a>
					</td>
				</tr><?php endforeach; endif; else: echo "" ;endif; ?>
			</tbody>
		</table>

		<?php echo ($pageshow); ?>

    </div>
<script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
</script>
</body>

</html>